using RxjhServer.DbClss;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace RxjhServer
{
	public class Move : Form
	{
		private IContainer components = null;

		private GroupBox groupBox1;

		private Button button1;

		private Label label3;

		private Label label2;

		private Label label1;

		private NumericUpDown numericUpDown3;

		private NumericUpDown numericUpDown2;

		private NumericUpDown numericUpDown1;

		private GroupBox groupBox2;

		private NumericUpDown numericUpDown4;

		private NumericUpDown numericUpDown5;

		private NumericUpDown numericUpDown6;

		private Label label4;

		private Label label5;

		private Label label6;

		private NumericUpDown numericUpDown7;

		private Label label7;

		private CheckBox checkBox1;

		private GroupBox groupBox3;

		private NumericUpDown numericUpDown8;

		private StatusStrip statusStrip1;

		private ToolStripStatusLabel toolStripStatusLabel1;

		private ToolStripStatusLabel tishi;

		private NumericUpDown numericUpDown9;

		private Label label8;

		private GroupBox groupBox4;

		private NumericUpDown numericUpDown10;

		public Move()
		{
			InitializeComponent();
		}

		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			if (!button1.Enabled)
			{
				button1.Enabled = true;
			}
		}

		private void Move_Load(object sender, EventArgs e)
		{
			numericUpDown1.Value = decimal.Parse(World.普通走.ToString());
			numericUpDown2.Value = decimal.Parse(World.轻功一.ToString());
			numericUpDown3.Value = decimal.Parse(World.轻功二.ToString());
			if (World.是否开启实时坐标显示 == 1)
			{
				checkBox1.Checked = true;
			}
			else
			{
				checkBox1.Checked = false;
			}
			numericUpDown6.Value = decimal.Parse(World.宠物普通走.ToString());
			numericUpDown5.Value = decimal.Parse(World.宠物轻功一.ToString());
			numericUpDown4.Value = decimal.Parse(World.宠物轻功二.ToString());
			numericUpDown7.Value = decimal.Parse(World.宠物轻功三.ToString());
			numericUpDown8.Value = decimal.Parse(World.实时检测距离.ToString());
			numericUpDown9.Value = decimal.Parse(World.轻功三.ToString());
			numericUpDown10.Value = decimal.Parse(World.实时移动时间.ToString());
		}

		private void button1_Click(object sender, EventArgs e)
		{
			World.普通走 = float.Parse(numericUpDown1.Value.ToString());
			World.轻功一 = float.Parse(numericUpDown2.Value.ToString());
			World.轻功二 = float.Parse(numericUpDown3.Value.ToString());
			World.轻功三 = float.Parse(numericUpDown9.Value.ToString());
			World.实时移动时间 = int.Parse(numericUpDown10.Value.ToString());
			World.宠物普通走 = float.Parse(numericUpDown6.Value.ToString());
			World.宠物轻功一 = float.Parse(numericUpDown5.Value.ToString());
			World.宠物轻功二 = float.Parse(numericUpDown4.Value.ToString());
			World.宠物轻功三 = float.Parse(numericUpDown7.Value.ToString());
			World.实时检测距离 = int.Parse(numericUpDown8.Value.ToString());
			if (checkBox1.Checked)
			{
				World.是否开启实时坐标显示 = 1;
			}
			else
			{
				World.是否开启实时坐标显示 = 0;
			}
			Config.IniWriteValue("GameServer", "普通走", numericUpDown1.Value.ToString());
			Config.IniWriteValue("GameServer", "轻功一", numericUpDown2.Value.ToString());
			Config.IniWriteValue("GameServer", "轻功二", numericUpDown3.Value.ToString());
			Config.IniWriteValue("GameServer", "轻功三", numericUpDown9.Value.ToString());
			Config.IniWriteValue("GameServer", "实时移动时间", numericUpDown10.Value.ToString());
			Config.IniWriteValue("GameServer", "实时检测距离", numericUpDown8.Value.ToString());
			if (checkBox1.Checked)
			{
				Config.IniWriteValue("GameServer", "是否开启实时坐标显示", "1");
			}
			else
			{
				Config.IniWriteValue("GameServer", "是否开启实时坐标显示", "0");
			}
			Config.IniWriteValue("GameServer", "宠物普通走", numericUpDown6.Value.ToString());
			Config.IniWriteValue("GameServer", "宠物轻功一", numericUpDown5.Value.ToString());
			Config.IniWriteValue("GameServer", "宠物轻功二", numericUpDown4.Value.ToString());
			Config.IniWriteValue("GameServer", "宠物轻功三", numericUpDown7.Value.ToString());
			tishi.Text = "保存加载成功！";
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && components != null)
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RxjhServer.Move));
			groupBox1 = new System.Windows.Forms.GroupBox();
			numericUpDown9 = new System.Windows.Forms.NumericUpDown();
			label8 = new System.Windows.Forms.Label();
			numericUpDown3 = new System.Windows.Forms.NumericUpDown();
			numericUpDown2 = new System.Windows.Forms.NumericUpDown();
			numericUpDown1 = new System.Windows.Forms.NumericUpDown();
			label3 = new System.Windows.Forms.Label();
			label2 = new System.Windows.Forms.Label();
			label1 = new System.Windows.Forms.Label();
			button1 = new System.Windows.Forms.Button();
			groupBox2 = new System.Windows.Forms.GroupBox();
			numericUpDown7 = new System.Windows.Forms.NumericUpDown();
			label7 = new System.Windows.Forms.Label();
			numericUpDown4 = new System.Windows.Forms.NumericUpDown();
			numericUpDown5 = new System.Windows.Forms.NumericUpDown();
			numericUpDown6 = new System.Windows.Forms.NumericUpDown();
			label4 = new System.Windows.Forms.Label();
			label5 = new System.Windows.Forms.Label();
			label6 = new System.Windows.Forms.Label();
			checkBox1 = new System.Windows.Forms.CheckBox();
			groupBox3 = new System.Windows.Forms.GroupBox();
			numericUpDown8 = new System.Windows.Forms.NumericUpDown();
			statusStrip1 = new System.Windows.Forms.StatusStrip();
			toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
			tishi = new System.Windows.Forms.ToolStripStatusLabel();
			groupBox4 = new System.Windows.Forms.GroupBox();
			numericUpDown10 = new System.Windows.Forms.NumericUpDown();
			groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)numericUpDown9).BeginInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown3).BeginInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown2).BeginInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown1).BeginInit();
			groupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)numericUpDown7).BeginInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown4).BeginInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown5).BeginInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown6).BeginInit();
			groupBox3.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)numericUpDown8).BeginInit();
			statusStrip1.SuspendLayout();
			groupBox4.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)numericUpDown10).BeginInit();
			SuspendLayout();
			groupBox1.Controls.Add(numericUpDown9);
			groupBox1.Controls.Add(label8);
			groupBox1.Controls.Add(numericUpDown3);
			groupBox1.Controls.Add(numericUpDown2);
			groupBox1.Controls.Add(numericUpDown1);
			groupBox1.Controls.Add(label3);
			groupBox1.Controls.Add(label2);
			groupBox1.Controls.Add(label1);
			groupBox1.Location = new System.Drawing.Point(12, 39);
			groupBox1.Name = "groupBox1";
			groupBox1.Size = new System.Drawing.Size(148, 146);
			groupBox1.TabIndex = 0;
			groupBox1.TabStop = false;
			groupBox1.Text = "人物移动参数";
			numericUpDown9.DecimalPlaces = 2;
			numericUpDown9.Increment = new decimal(new int[4]
			{
				1,
				0,
				0,
				65536
			});
			numericUpDown9.Location = new System.Drawing.Point(64, 118);
			numericUpDown9.Name = "numericUpDown9";
			numericUpDown9.Size = new System.Drawing.Size(58, 21);
			numericUpDown9.TabIndex = 8;
			label8.AutoSize = true;
			label8.Location = new System.Drawing.Point(16, 123);
			label8.Name = "label8";
			label8.Size = new System.Drawing.Size(41, 12);
			label8.TabIndex = 7;
			label8.Text = "草上飞";
			numericUpDown3.DecimalPlaces = 2;
			numericUpDown3.Increment = new decimal(new int[4]
			{
				1,
				0,
				0,
				65536
			});
			numericUpDown3.Location = new System.Drawing.Point(63, 88);
			numericUpDown3.Name = "numericUpDown3";
			numericUpDown3.Size = new System.Drawing.Size(58, 21);
			numericUpDown3.TabIndex = 6;
			numericUpDown3.ValueChanged += new System.EventHandler(numericUpDown1_ValueChanged);
			numericUpDown2.DecimalPlaces = 2;
			numericUpDown2.Increment = new decimal(new int[4]
			{
				1,
				0,
				0,
				65536
			});
			numericUpDown2.Location = new System.Drawing.Point(64, 56);
			numericUpDown2.Name = "numericUpDown2";
			numericUpDown2.Size = new System.Drawing.Size(58, 21);
			numericUpDown2.TabIndex = 5;
			numericUpDown2.ValueChanged += new System.EventHandler(numericUpDown1_ValueChanged);
			numericUpDown1.DecimalPlaces = 2;
			numericUpDown1.Increment = new decimal(new int[4]
			{
				1,
				0,
				0,
				65536
			});
			numericUpDown1.Location = new System.Drawing.Point(64, 22);
			numericUpDown1.Name = "numericUpDown1";
			numericUpDown1.Size = new System.Drawing.Size(58, 21);
			numericUpDown1.TabIndex = 4;
			numericUpDown1.ValueChanged += new System.EventHandler(numericUpDown1_ValueChanged);
			label3.AutoSize = true;
			label3.Location = new System.Drawing.Point(16, 25);
			label3.Name = "label3";
			label3.Size = new System.Drawing.Size(41, 12);
			label3.TabIndex = 2;
			label3.Text = "普通跑";
			label2.AutoSize = true;
			label2.Location = new System.Drawing.Point(16, 62);
			label2.Name = "label2";
			label2.Size = new System.Drawing.Size(41, 12);
			label2.TabIndex = 1;
			label2.Text = "15轻功";
			label1.AutoSize = true;
			label1.Location = new System.Drawing.Point(15, 93);
			label1.Name = "label1";
			label1.Size = new System.Drawing.Size(41, 12);
			label1.TabIndex = 0;
			label1.Text = "60轻功";
			button1.Enabled = false;
			button1.Location = new System.Drawing.Point(255, 202);
			button1.Name = "button1";
			button1.Size = new System.Drawing.Size(88, 35);
			button1.TabIndex = 3;
			button1.Text = "保存并加载";
			button1.UseVisualStyleBackColor = true;
			button1.Click += new System.EventHandler(button1_Click);
			groupBox2.Controls.Add(numericUpDown7);
			groupBox2.Controls.Add(label7);
			groupBox2.Controls.Add(numericUpDown4);
			groupBox2.Controls.Add(numericUpDown5);
			groupBox2.Controls.Add(numericUpDown6);
			groupBox2.Controls.Add(label4);
			groupBox2.Controls.Add(label5);
			groupBox2.Controls.Add(label6);
			groupBox2.Location = new System.Drawing.Point(191, 12);
			groupBox2.Name = "groupBox2";
			groupBox2.Size = new System.Drawing.Size(148, 173);
			groupBox2.TabIndex = 7;
			groupBox2.TabStop = false;
			groupBox2.Text = "坐骑移动参数";
			numericUpDown7.DecimalPlaces = 2;
			numericUpDown7.Increment = new decimal(new int[4]
			{
				1,
				0,
				0,
				65536
			});
			numericUpDown7.Location = new System.Drawing.Point(63, 129);
			numericUpDown7.Name = "numericUpDown7";
			numericUpDown7.Size = new System.Drawing.Size(58, 21);
			numericUpDown7.TabIndex = 8;
			label7.AutoSize = true;
			label7.Location = new System.Drawing.Point(15, 134);
			label7.Name = "label7";
			label7.Size = new System.Drawing.Size(41, 12);
			label7.TabIndex = 7;
			label7.Text = "轻功三";
			numericUpDown4.DecimalPlaces = 2;
			numericUpDown4.Increment = new decimal(new int[4]
			{
				1,
				0,
				0,
				65536
			});
			numericUpDown4.Location = new System.Drawing.Point(63, 97);
			numericUpDown4.Name = "numericUpDown4";
			numericUpDown4.Size = new System.Drawing.Size(58, 21);
			numericUpDown4.TabIndex = 6;
			numericUpDown5.DecimalPlaces = 2;
			numericUpDown5.Increment = new decimal(new int[4]
			{
				1,
				0,
				0,
				65536
			});
			numericUpDown5.Location = new System.Drawing.Point(64, 65);
			numericUpDown5.Name = "numericUpDown5";
			numericUpDown5.Size = new System.Drawing.Size(58, 21);
			numericUpDown5.TabIndex = 5;
			numericUpDown6.DecimalPlaces = 2;
			numericUpDown6.Increment = new decimal(new int[4]
			{
				1,
				0,
				0,
				65536
			});
			numericUpDown6.Location = new System.Drawing.Point(64, 31);
			numericUpDown6.Name = "numericUpDown6";
			numericUpDown6.Size = new System.Drawing.Size(58, 21);
			numericUpDown6.TabIndex = 4;
			label4.AutoSize = true;
			label4.Location = new System.Drawing.Point(16, 34);
			label4.Name = "label4";
			label4.Size = new System.Drawing.Size(41, 12);
			label4.TabIndex = 2;
			label4.Text = "普通跑";
			label5.AutoSize = true;
			label5.Location = new System.Drawing.Point(16, 71);
			label5.Name = "label5";
			label5.Size = new System.Drawing.Size(41, 12);
			label5.TabIndex = 1;
			label5.Text = "轻功一";
			label6.AutoSize = true;
			label6.Location = new System.Drawing.Point(15, 102);
			label6.Name = "label6";
			label6.Size = new System.Drawing.Size(41, 12);
			label6.TabIndex = 0;
			label6.Text = "轻功二";
			checkBox1.AutoSize = true;
			checkBox1.Location = new System.Drawing.Point(14, 12);
			checkBox1.Name = "checkBox1";
			checkBox1.Size = new System.Drawing.Size(120, 16);
			checkBox1.TabIndex = 8;
			checkBox1.Text = "是否开启坐标显示";
			checkBox1.UseVisualStyleBackColor = true;
			groupBox3.Controls.Add(numericUpDown8);
			groupBox3.Location = new System.Drawing.Point(14, 191);
			groupBox3.Name = "groupBox3";
			groupBox3.Size = new System.Drawing.Size(105, 53);
			groupBox3.TabIndex = 9;
			groupBox3.TabStop = false;
			groupBox3.Text = "实时检测距离";
			numericUpDown8.Increment = new decimal(new int[4]
			{
				10,
				0,
				0,
				0
			});
			numericUpDown8.Location = new System.Drawing.Point(15, 20);
			numericUpDown8.Name = "numericUpDown8";
			numericUpDown8.Size = new System.Drawing.Size(49, 21);
			numericUpDown8.TabIndex = 0;
			numericUpDown8.ValueChanged += new System.EventHandler(numericUpDown1_ValueChanged);
			statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[2]
			{
				toolStripStatusLabel1,
				tishi
			});
			statusStrip1.Location = new System.Drawing.Point(0, 259);
			statusStrip1.Name = "statusStrip1";
			statusStrip1.Size = new System.Drawing.Size(355, 22);
			statusStrip1.TabIndex = 10;
			statusStrip1.Text = "statusStrip1";
			toolStripStatusLabel1.ForeColor = System.Drawing.Color.Red;
			toolStripStatusLabel1.Name = "toolStripStatusLabel1";
			toolStripStatusLabel1.Size = new System.Drawing.Size(44, 17);
			toolStripStatusLabel1.Text = "提示：";
			tishi.ForeColor = System.Drawing.Color.Cyan;
			tishi.Name = "tishi";
			tishi.Size = new System.Drawing.Size(0, 17);
			groupBox4.Controls.Add(numericUpDown10);
			groupBox4.Location = new System.Drawing.Point(125, 191);
			groupBox4.Name = "groupBox4";
			groupBox4.Size = new System.Drawing.Size(108, 53);
			groupBox4.TabIndex = 10;
			groupBox4.TabStop = false;
			groupBox4.Text = "实时计算时间";
			numericUpDown10.Increment = new decimal(new int[4]
			{
				10,
				0,
				0,
				0
			});
			numericUpDown10.Location = new System.Drawing.Point(15, 20);
			numericUpDown10.Maximum = new decimal(new int[4]
			{
				1000000,
				0,
				0,
				0
			});
			numericUpDown10.Name = "numericUpDown10";
			numericUpDown10.Size = new System.Drawing.Size(49, 21);
			numericUpDown10.TabIndex = 0;
			base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			base.ClientSize = new System.Drawing.Size(355, 281);
			base.Controls.Add(groupBox4);
			base.Controls.Add(statusStrip1);
			base.Controls.Add(groupBox3);
			base.Controls.Add(checkBox1);
			base.Controls.Add(groupBox2);
			base.Controls.Add(groupBox1);
			base.Controls.Add(button1);
			base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
			base.MaximizeBox = false;
			base.MinimizeBox = false;
			base.Name = "Move";
			Text = "Move";
			base.Load += new System.EventHandler(Move_Load);
			groupBox1.ResumeLayout(false);
			groupBox1.PerformLayout();
			((System.ComponentModel.ISupportInitialize)numericUpDown9).EndInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown3).EndInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown2).EndInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown1).EndInit();
			groupBox2.ResumeLayout(false);
			groupBox2.PerformLayout();
			((System.ComponentModel.ISupportInitialize)numericUpDown7).EndInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown4).EndInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown5).EndInit();
			((System.ComponentModel.ISupportInitialize)numericUpDown6).EndInit();
			groupBox3.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)numericUpDown8).EndInit();
			statusStrip1.ResumeLayout(false);
			statusStrip1.PerformLayout();
			groupBox4.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)numericUpDown10).EndInit();
			ResumeLayout(false);
			PerformLayout();
		}
	}
}
